<extend name="Public/located_base" />
<block name="body">
<div class="container">
    <div class="row ruzhu4 ruzhu">
      <div class="col-xs-12">
        <div class="heads">
          <ul class="after">
            <li>
              <div class="txt">入驻须知</div>
              <p class="block"></p>
              <div class="img"><span class="has">1</span></div>
            </li>
            <li>
              <div class="txt">商家认证</div>
              <p class="block"></p>
              <div class="img"><span  class="has">2</span></div>
            </li>
            <li>
              <div class="txt current">商家信息</div>
              <p class="block"></p>
              <div class="img"><span class="has">3</span></div>
            </li>
            <li>
              <div class="txt">审核结果</div>
              <p class="block"></p>
              <div class="img"><span>4</span></div>
            </li>
          </ul>
          <div class="line"></div>
        </div>

        <!--表格-->
        <form class="formlists J_store_valid" id="store_form" action="__SELF__">
          <!--提醒图片格式-->
          <div class="login-form after">
            <legend>店铺信息</legend>
            <div class="col-xs-12 form-horizontal">
              <fieldset>
                <div class="form-group">
                  <label class="col-xs-4 control-label">商家账号</label>
                  <div class="col-xs-5">
                    <input type="text" name="seller_name" class="form-control" placeholder="请输入商家账号"  errormsg="商家账号不能大于20位" nullmsg="请输入商家账号" datatype="*1-20"/>
                    <p class="notices text-red">此账号为商家中心登录账号，注册后不可更改</p>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-xs-4 control-label">店铺名称</label>
                  <div class="col-xs-5">
                    <input type="text" name="store_name" class="form-control" placeholder="请输入店铺名称"  errormsg="店铺名称必须小于20位" nullmsg="请输入店铺名称" datatype="*1-20"/>
                    <p class="notices text-red">店铺名确认后不可更改</p>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-xs-4 control-label">店铺等级</label>
                  <div class="col-xs-5">
                    <select name="grade_id" class="form-control J_grade_select" nullmsg="请选择店铺等级" datatype="n"/>
                        <option value="">请选择</option>
                        <volist name="grade" id="vo">
                          <option value="{$vo['id']}" data-msg="商品数：{$vo['goods_limit'] ? : '不限制'}； 收费标准：{$vo['price']}">{$vo['name']}</option>
                        </volist>
                    </select>
                    <p class="notices J_grade_msg">不同等级店铺可上传商品数不同</p>
                  </div>
                </div>
                
                <div class="form-group nomargin-bot">
                  <label class="col-xs-4 control-label">经营类目</label>
                  <div class="col-xs-8 jylm">
                    <div class="jylm-top after">
                        <div class="col-xs-8 after" id="J_store_class"></div>
                        <div class="col-xs-4 after">
                            <button class="btn btn-block" id="J_add_class">确定</button>
                            <button class="btn btn-block" id="J_cancel">取消</button>
                            <div style="
                            margin-top:10px;
                            padding: 12px 0;
                            float: left;
                            width: 46%;
                            margin-right: 4%;
                            display:block;
                            font-weight: 400;
                            text-align: center;
                            vertical-align: middle;
                            cursor: pointer;
                            border: 1px solid #dfdfdf;
                            font-size: 16px;
                            line-height: 1.125;
                            border-radius: 4px;
                            color: #333;
                            background-color: #fff;
                            -webkit-user-select: none;">
                              <input id="cate-div" type="checkbox" name="all_cate" value="1">全选</div>
                        </div>                   
                    </div>
                    <table class="jylm-bot">
                        <thead>
                            <tr>
                                <td>一级类目</td>
                                <td>二级类目</td>
                                <td>三级类目</td>
                                <td>操作</td>
                            </tr>
                        </thead>
                        <style>
                          #J_select_class .J_del_class{cursor: pointer;}
                        </style>
                        <tbody id="J_select_class"></tbody>

                    </table>
                  </div>
                </div>
              
                <div class="form-group btnbox">
                  <div class="col-xs-2 col-xs-offset-2">
                    <button class="btn btn-block btn-add J_back">上一步</button>
                  </div>
                  <div class="col-xs-5 ">
                    <button class="btn btn-block btn-positive J_next sure">下一步</button>
                  </div>
                </div>
              </fieldset>
            </div>
          </div>
        </form>
      </div>

    </div>
  </div>
  <script type="text/javascript">
    seajs.use(['settle'], function(settle){
      if($('.sure').click(function(){
        var items  = $('input[name="store_class_ids[]"]').val();
        var _checked = $('#cate-div').is(':checked');
        if(_checked == false){
          if(items == '' || items == null){
             $.ui.alert('请选择经营类目');
             return false;
          }
        }
        
      }))
        settle.store();
        settle.cateSelect();
    });
  </script>
</block>